package com.example.mobile0123456789hwh0330homework;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    private TextView textView;
    private Button btnMainTip1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();

        btnMainTip1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//        界面跳转
                Intent intent1=new Intent(MainActivity.this,Tip1Activity.class);
                startActivity(intent1);

            }
        });
//        btnMainTip2.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                //                Intent intent2=new Intent(MainActivity.this,Tip2Activity.class);
////                startActivity(intent2);
//            }
//        });


    }

    private void initView() {
        textView = (TextView) findViewById(R.id.textView);
        btnMainTip1 = (Button) findViewById(R.id.btn_main_tip1);
    }
}